package by.grsu.crs.dao;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;

import by.grsu.crs.model.ICar;
import by.grsu.crs.model.Order;
import by.grsu.crs.model.Status;
import by.grsu.crs.model.User;

public interface OrderDao {
	public boolean addOrder(Order order) throws SQLException;

	public List<Order> getAllOrders() throws SQLException;

	public Order getOrderById(int id) throws SQLException;
	
	public Order getOrderByOrderNumber(int orderNumber) throws SQLException;
	
	public List<Order> getOrdersByClient(User client) throws SQLException;
	
	public List<Order> getOrdersByCar(ICar car) throws SQLException;
	
	public List<Order> getOrdersByBeganDate(Date orderBegan) throws SQLException;
	
	public List<Order> getOrdersByEndedDate(Date orderEnded) throws SQLException;
	
	public List<Order> getOrdersByStatus(Status status) throws SQLException;

	public boolean deleteOrderByID(int id) throws SQLException;

	public boolean updateOrderById(int id, Order order) throws SQLException;
}
